{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "filename = '../data/leavemarket.xlsx'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "df = pd.read_excel(filename)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>code</th>\n",
       "      <th>name</th>\n",
       "      <th>price</th>\n",
       "      <th>zgcode</th>\n",
       "      <th>zg</th>\n",
       "      <th>issuescale</th>\n",
       "      <th>recallscale</th>\n",
       "      <th>remain</th>\n",
       "      <th>issu</th>\n",
       "      <th>stop</th>\n",
       "      <th>end</th>\n",
       "      <th>stayyear</th>\n",
       "      <th>result</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>123081</td>\n",
       "      <td>精研转债</td>\n",
       "      <td>149.00</td>\n",
       "      <td>300709</td>\n",
       "      <td>精研科技</td>\n",
       "      <td>5.700</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.384</td>\n",
       "      <td>2020-12-03</td>\n",
       "      <td>2021-12-17</td>\n",
       "      <td>2026-12-02</td>\n",
       "      <td>1.0</td>\n",
       "      <td>强赎</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>110051</td>\n",
       "      <td>中天转债</td>\n",
       "      <td>178.19</td>\n",
       "      <td>600522</td>\n",
       "      <td>中天科技</td>\n",
       "      <td>39.651</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.052</td>\n",
       "      <td>2019-02-28</td>\n",
       "      <td>2021-12-16</td>\n",
       "      <td>2025-02-28</td>\n",
       "      <td>2.8</td>\n",
       "      <td>强赎</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>123074</td>\n",
       "      <td>隆利转债</td>\n",
       "      <td>162.20</td>\n",
       "      <td>300752</td>\n",
       "      <td>隆利科技</td>\n",
       "      <td>3.245</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.592</td>\n",
       "      <td>2020-10-29</td>\n",
       "      <td>2021-12-15</td>\n",
       "      <td>2026-10-28</td>\n",
       "      <td>1.1</td>\n",
       "      <td>强赎</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>113614</td>\n",
       "      <td>健20转债</td>\n",
       "      <td>142.12</td>\n",
       "      <td>603707</td>\n",
       "      <td>健友股份</td>\n",
       "      <td>7.800</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.011</td>\n",
       "      <td>2020-12-17</td>\n",
       "      <td>2021-12-14</td>\n",
       "      <td>2026-12-16</td>\n",
       "      <td>1.0</td>\n",
       "      <td>强赎</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>113603</td>\n",
       "      <td>东缆转债</td>\n",
       "      <td>239.44</td>\n",
       "      <td>603606</td>\n",
       "      <td>东方电缆</td>\n",
       "      <td>8.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.050</td>\n",
       "      <td>2020-09-24</td>\n",
       "      <td>2021-11-29</td>\n",
       "      <td>2026-09-23</td>\n",
       "      <td>1.2</td>\n",
       "      <td>强赎</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     code   name   price  zgcode    zg  issuescale  recallscale  remain  \\\n",
       "0  123081   精研转债  149.00  300709  精研科技       5.700          0.0   0.384   \n",
       "1  110051   中天转债  178.19  600522  中天科技      39.651          0.0   0.052   \n",
       "2  123074   隆利转债  162.20  300752  隆利科技       3.245          0.0   0.592   \n",
       "3  113614  健20转债  142.12  603707  健友股份       7.800          0.0   0.011   \n",
       "4  113603   东缆转债  239.44  603606  东方电缆       8.000          0.0   0.050   \n",
       "\n",
       "        issu       stop        end  stayyear result  \n",
       "0 2020-12-03 2021-12-17 2026-12-02       1.0     强赎  \n",
       "1 2019-02-28 2021-12-16 2025-02-28       2.8     强赎  \n",
       "2 2020-10-29 2021-12-15 2026-10-28       1.1     强赎  \n",
       "3 2020-12-17 2021-12-14 2026-12-16       1.0     强赎  \n",
       "4 2020-09-24 2021-11-29 2026-09-23       1.2     强赎  "
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 218 entries, 0 to 217\n",
      "Data columns (total 13 columns):\n",
      " #   Column       Non-Null Count  Dtype         \n",
      "---  ------       --------------  -----         \n",
      " 0   code         218 non-null    int64         \n",
      " 1   name         218 non-null    object        \n",
      " 2   price        218 non-null    float64       \n",
      " 3   zgcode       218 non-null    int64         \n",
      " 4   zg           218 non-null    object        \n",
      " 5   issuescale   218 non-null    float64       \n",
      " 6   recallscale  218 non-null    float64       \n",
      " 7   remain       218 non-null    float64       \n",
      " 8   issu         218 non-null    datetime64[ns]\n",
      " 9   stop         217 non-null    datetime64[ns]\n",
      " 10  end          218 non-null    datetime64[ns]\n",
      " 11  stayyear     217 non-null    float64       \n",
      " 12  result       218 non-null    object        \n",
      "dtypes: datetime64[ns](3), float64(5), int64(2), object(3)\n",
      "memory usage: 22.3+ KB\n"
     ]
    }
   ],
   "source": [
    "df.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "import datetime"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "def get_remain_year(x):\n",
    "    years = (x['end']-x['stop']).days/365\n",
    "    return years"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "df['more_year']=df.apply(get_remain_year,axis=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>code</th>\n",
       "      <th>name</th>\n",
       "      <th>price</th>\n",
       "      <th>zgcode</th>\n",
       "      <th>zg</th>\n",
       "      <th>issuescale</th>\n",
       "      <th>recallscale</th>\n",
       "      <th>remain</th>\n",
       "      <th>issu</th>\n",
       "      <th>stop</th>\n",
       "      <th>end</th>\n",
       "      <th>stayyear</th>\n",
       "      <th>result</th>\n",
       "      <th>more_year</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>123081</td>\n",
       "      <td>精研转债</td>\n",
       "      <td>149.00</td>\n",
       "      <td>300709</td>\n",
       "      <td>精研科技</td>\n",
       "      <td>5.700</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.384</td>\n",
       "      <td>2020-12-03</td>\n",
       "      <td>2021-12-17</td>\n",
       "      <td>2026-12-02</td>\n",
       "      <td>1.0</td>\n",
       "      <td>强赎</td>\n",
       "      <td>4.961644</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>110051</td>\n",
       "      <td>中天转债</td>\n",
       "      <td>178.19</td>\n",
       "      <td>600522</td>\n",
       "      <td>中天科技</td>\n",
       "      <td>39.651</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.052</td>\n",
       "      <td>2019-02-28</td>\n",
       "      <td>2021-12-16</td>\n",
       "      <td>2025-02-28</td>\n",
       "      <td>2.8</td>\n",
       "      <td>强赎</td>\n",
       "      <td>3.205479</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>123074</td>\n",
       "      <td>隆利转债</td>\n",
       "      <td>162.20</td>\n",
       "      <td>300752</td>\n",
       "      <td>隆利科技</td>\n",
       "      <td>3.245</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.592</td>\n",
       "      <td>2020-10-29</td>\n",
       "      <td>2021-12-15</td>\n",
       "      <td>2026-10-28</td>\n",
       "      <td>1.1</td>\n",
       "      <td>强赎</td>\n",
       "      <td>4.871233</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>113614</td>\n",
       "      <td>健20转债</td>\n",
       "      <td>142.12</td>\n",
       "      <td>603707</td>\n",
       "      <td>健友股份</td>\n",
       "      <td>7.800</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.011</td>\n",
       "      <td>2020-12-17</td>\n",
       "      <td>2021-12-14</td>\n",
       "      <td>2026-12-16</td>\n",
       "      <td>1.0</td>\n",
       "      <td>强赎</td>\n",
       "      <td>5.008219</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>113603</td>\n",
       "      <td>东缆转债</td>\n",
       "      <td>239.44</td>\n",
       "      <td>603606</td>\n",
       "      <td>东方电缆</td>\n",
       "      <td>8.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.050</td>\n",
       "      <td>2020-09-24</td>\n",
       "      <td>2021-11-29</td>\n",
       "      <td>2026-09-23</td>\n",
       "      <td>1.2</td>\n",
       "      <td>强赎</td>\n",
       "      <td>4.819178</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     code   name   price  zgcode    zg  issuescale  recallscale  remain  \\\n",
       "0  123081   精研转债  149.00  300709  精研科技       5.700          0.0   0.384   \n",
       "1  110051   中天转债  178.19  600522  中天科技      39.651          0.0   0.052   \n",
       "2  123074   隆利转债  162.20  300752  隆利科技       3.245          0.0   0.592   \n",
       "3  113614  健20转债  142.12  603707  健友股份       7.800          0.0   0.011   \n",
       "4  113603   东缆转债  239.44  603606  东方电缆       8.000          0.0   0.050   \n",
       "\n",
       "        issu       stop        end  stayyear result  more_year  \n",
       "0 2020-12-03 2021-12-17 2026-12-02       1.0     强赎   4.961644  \n",
       "1 2019-02-28 2021-12-16 2025-02-28       2.8     强赎   3.205479  \n",
       "2 2020-10-29 2021-12-15 2026-10-28       1.1     强赎   4.871233  \n",
       "3 2020-12-17 2021-12-14 2026-12-16       1.0     强赎   5.008219  \n",
       "4 2020-09-24 2021-11-29 2026-09-23       1.2     强赎   4.819178  "
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>code</th>\n",
       "      <th>name</th>\n",
       "      <th>price</th>\n",
       "      <th>zgcode</th>\n",
       "      <th>zg</th>\n",
       "      <th>issuescale</th>\n",
       "      <th>recallscale</th>\n",
       "      <th>remain</th>\n",
       "      <th>issu</th>\n",
       "      <th>stop</th>\n",
       "      <th>end</th>\n",
       "      <th>stayyear</th>\n",
       "      <th>result</th>\n",
       "      <th>more_year</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>110033</td>\n",
       "      <td>国贸转债</td>\n",
       "      <td>101.640</td>\n",
       "      <td>600755</td>\n",
       "      <td>厦门国贸</td>\n",
       "      <td>28.00</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.336</td>\n",
       "      <td>2016-01-05</td>\n",
       "      <td>2021-11-04</td>\n",
       "      <td>2022-01-05</td>\n",
       "      <td>5.8</td>\n",
       "      <td>强赎</td>\n",
       "      <td>0.169863</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>45</th>\n",
       "      <td>110031</td>\n",
       "      <td>航信转债</td>\n",
       "      <td>106.700</td>\n",
       "      <td>600271</td>\n",
       "      <td>航天信息</td>\n",
       "      <td>24.00</td>\n",
       "      <td>0.000</td>\n",
       "      <td>23.983</td>\n",
       "      <td>2015-06-12</td>\n",
       "      <td>2021-05-28</td>\n",
       "      <td>2021-06-12</td>\n",
       "      <td>6.0</td>\n",
       "      <td>到期</td>\n",
       "      <td>0.041096</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>60</th>\n",
       "      <td>128010</td>\n",
       "      <td>蔚蓝转债</td>\n",
       "      <td>108.790</td>\n",
       "      <td>2245</td>\n",
       "      <td>蔚蓝锂芯</td>\n",
       "      <td>5.10</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.385</td>\n",
       "      <td>2016-01-22</td>\n",
       "      <td>2021-02-26</td>\n",
       "      <td>2022-01-22</td>\n",
       "      <td>5.1</td>\n",
       "      <td>强赎</td>\n",
       "      <td>0.904110</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>69</th>\n",
       "      <td>113008</td>\n",
       "      <td>电气转债</td>\n",
       "      <td>106.480</td>\n",
       "      <td>601727</td>\n",
       "      <td>上海电气</td>\n",
       "      <td>60.00</td>\n",
       "      <td>0.000</td>\n",
       "      <td>13.422</td>\n",
       "      <td>2015-02-02</td>\n",
       "      <td>2021-01-18</td>\n",
       "      <td>2021-02-02</td>\n",
       "      <td>6.0</td>\n",
       "      <td>到期</td>\n",
       "      <td>0.041096</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>149</th>\n",
       "      <td>110030</td>\n",
       "      <td>格力转债</td>\n",
       "      <td>105.690</td>\n",
       "      <td>600185</td>\n",
       "      <td>格力地产</td>\n",
       "      <td>9.80</td>\n",
       "      <td>0.000</td>\n",
       "      <td>4.251</td>\n",
       "      <td>2014-12-25</td>\n",
       "      <td>2019-12-10</td>\n",
       "      <td>2019-12-25</td>\n",
       "      <td>5.0</td>\n",
       "      <td>到期</td>\n",
       "      <td>0.041096</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>183</th>\n",
       "      <td>126729</td>\n",
       "      <td>燕京转债</td>\n",
       "      <td>149.979</td>\n",
       "      <td>729</td>\n",
       "      <td>燕京啤酒</td>\n",
       "      <td>11.30</td>\n",
       "      <td>2.623</td>\n",
       "      <td>0.025</td>\n",
       "      <td>2010-10-15</td>\n",
       "      <td>2015-05-28</td>\n",
       "      <td>2015-10-14</td>\n",
       "      <td>4.6</td>\n",
       "      <td>强赎</td>\n",
       "      <td>0.380822</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>188</th>\n",
       "      <td>110012</td>\n",
       "      <td>海运转债</td>\n",
       "      <td>206.460</td>\n",
       "      <td>600798</td>\n",
       "      <td>宁波海运</td>\n",
       "      <td>7.20</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.013</td>\n",
       "      <td>2011-01-07</td>\n",
       "      <td>2015-05-11</td>\n",
       "      <td>2016-01-07</td>\n",
       "      <td>4.3</td>\n",
       "      <td>强赎</td>\n",
       "      <td>0.660274</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>210</th>\n",
       "      <td>110007</td>\n",
       "      <td>博汇转债</td>\n",
       "      <td>108.610</td>\n",
       "      <td>600966</td>\n",
       "      <td>博汇纸业</td>\n",
       "      <td>9.75</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.145</td>\n",
       "      <td>2009-09-23</td>\n",
       "      <td>2014-09-05</td>\n",
       "      <td>2014-09-23</td>\n",
       "      <td>5.0</td>\n",
       "      <td>到期</td>\n",
       "      <td>0.049315</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>213</th>\n",
       "      <td>110003</td>\n",
       "      <td>新钢转债</td>\n",
       "      <td>106.550</td>\n",
       "      <td>600782</td>\n",
       "      <td>新钢股份</td>\n",
       "      <td>27.60</td>\n",
       "      <td>0.024</td>\n",
       "      <td>27.576</td>\n",
       "      <td>2008-08-21</td>\n",
       "      <td>2013-08-06</td>\n",
       "      <td>2013-08-20</td>\n",
       "      <td>5.0</td>\n",
       "      <td>到期</td>\n",
       "      <td>0.038356</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       code  name    price  zgcode    zg  issuescale  recallscale  remain  \\\n",
       "12   110033  国贸转债  101.640  600755  厦门国贸       28.00        0.000   0.336   \n",
       "45   110031  航信转债  106.700  600271  航天信息       24.00        0.000  23.983   \n",
       "60   128010  蔚蓝转债  108.790    2245  蔚蓝锂芯        5.10        0.000   0.385   \n",
       "69   113008  电气转债  106.480  601727  上海电气       60.00        0.000  13.422   \n",
       "149  110030  格力转债  105.690  600185  格力地产        9.80        0.000   4.251   \n",
       "183  126729  燕京转债  149.979     729  燕京啤酒       11.30        2.623   0.025   \n",
       "188  110012  海运转债  206.460  600798  宁波海运        7.20        0.000   0.013   \n",
       "210  110007  博汇转债  108.610  600966  博汇纸业        9.75        0.000   0.145   \n",
       "213  110003  新钢转债  106.550  600782  新钢股份       27.60        0.024  27.576   \n",
       "\n",
       "          issu       stop        end  stayyear result  more_year  \n",
       "12  2016-01-05 2021-11-04 2022-01-05       5.8     强赎   0.169863  \n",
       "45  2015-06-12 2021-05-28 2021-06-12       6.0     到期   0.041096  \n",
       "60  2016-01-22 2021-02-26 2022-01-22       5.1     强赎   0.904110  \n",
       "69  2015-02-02 2021-01-18 2021-02-02       6.0     到期   0.041096  \n",
       "149 2014-12-25 2019-12-10 2019-12-25       5.0     到期   0.041096  \n",
       "183 2010-10-15 2015-05-28 2015-10-14       4.6     强赎   0.380822  \n",
       "188 2011-01-07 2015-05-11 2016-01-07       4.3     强赎   0.660274  \n",
       "210 2009-09-23 2014-09-05 2014-09-23       5.0     到期   0.049315  \n",
       "213 2008-08-21 2013-08-06 2013-08-20       5.0     到期   0.038356  "
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cb_df[cb_df['more_year']<=1.2]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "cb_df=df[~df['name'].str.endswith('EB')]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "19"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(cb_df[cb_df['more_year']<=2.1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "9"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(cb_df[cb_df['more_year']<=1.1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "强赎         193\n",
       "到期           5\n",
       "不足3000万      4\n",
       "低于3千万        2\n",
       "撤销发行         1\n",
       "Name: result, dtype: int64"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cb_df['result'].value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>转债名称</th>\n",
       "      <th>发行时间</th>\n",
       "      <th>退市时间</th>\n",
       "      <th>条款到期时间</th>\n",
       "      <th>存续年限</th>\n",
       "      <th>结果</th>\n",
       "      <th>剩余多少年</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>代码</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>110031</th>\n",
       "      <td>航信转债</td>\n",
       "      <td>2015-06-12</td>\n",
       "      <td>2021-05-28</td>\n",
       "      <td>2021-06-12</td>\n",
       "      <td>6.0</td>\n",
       "      <td>到期</td>\n",
       "      <td>0.041096</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>113008</th>\n",
       "      <td>电气转债</td>\n",
       "      <td>2015-02-02</td>\n",
       "      <td>2021-01-18</td>\n",
       "      <td>2021-02-02</td>\n",
       "      <td>6.0</td>\n",
       "      <td>到期</td>\n",
       "      <td>0.041096</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>110030</th>\n",
       "      <td>格力转债</td>\n",
       "      <td>2014-12-25</td>\n",
       "      <td>2019-12-10</td>\n",
       "      <td>2019-12-25</td>\n",
       "      <td>5.0</td>\n",
       "      <td>到期</td>\n",
       "      <td>0.041096</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>110007</th>\n",
       "      <td>博汇转债</td>\n",
       "      <td>2009-09-23</td>\n",
       "      <td>2014-09-05</td>\n",
       "      <td>2014-09-23</td>\n",
       "      <td>5.0</td>\n",
       "      <td>到期</td>\n",
       "      <td>0.049315</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>110003</th>\n",
       "      <td>新钢转债</td>\n",
       "      <td>2008-08-21</td>\n",
       "      <td>2013-08-06</td>\n",
       "      <td>2013-08-20</td>\n",
       "      <td>5.0</td>\n",
       "      <td>到期</td>\n",
       "      <td>0.038356</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        转债名称       发行时间       退市时间     条款到期时间  存续年限  结果     剩余多少年\n",
       "代码                                                               \n",
       "110031  航信转债 2015-06-12 2021-05-28 2021-06-12   6.0  到期  0.041096\n",
       "113008  电气转债 2015-02-02 2021-01-18 2021-02-02   6.0  到期  0.041096\n",
       "110030  格力转债 2014-12-25 2019-12-10 2019-12-25   5.0  到期  0.041096\n",
       "110007  博汇转债 2009-09-23 2014-09-05 2014-09-23   5.0  到期  0.049315\n",
       "110003  新钢转债 2008-08-21 2013-08-06 2013-08-20   5.0  到期  0.038356"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cc_df_[cc_df_['结果']=='到期']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>转债名称</th>\n",
       "      <th>发行时间</th>\n",
       "      <th>退市时间</th>\n",
       "      <th>条款到期时间</th>\n",
       "      <th>存续年限</th>\n",
       "      <th>结果</th>\n",
       "      <th>剩余多少年</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>代码</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>128060</th>\n",
       "      <td>中装转债</td>\n",
       "      <td>2019-03-26</td>\n",
       "      <td>2020-02-12</td>\n",
       "      <td>2025-03-26</td>\n",
       "      <td>0.9</td>\n",
       "      <td>不足3000万</td>\n",
       "      <td>5.120548</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>113507</th>\n",
       "      <td>天马转债</td>\n",
       "      <td>2018-04-17</td>\n",
       "      <td>2019-11-04</td>\n",
       "      <td>2024-04-17</td>\n",
       "      <td>1.6</td>\n",
       "      <td>不足3000万</td>\n",
       "      <td>4.454795</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>113010</th>\n",
       "      <td>江南转债</td>\n",
       "      <td>2016-03-18</td>\n",
       "      <td>2019-01-29</td>\n",
       "      <td>2022-03-18</td>\n",
       "      <td>2.9</td>\n",
       "      <td>不足3000万</td>\n",
       "      <td>3.134247</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>110009</th>\n",
       "      <td>双良转债</td>\n",
       "      <td>2010-05-04</td>\n",
       "      <td>2011-12-14</td>\n",
       "      <td>2015-05-04</td>\n",
       "      <td>1.6</td>\n",
       "      <td>不足3000万</td>\n",
       "      <td>3.389041</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        转债名称       发行时间       退市时间     条款到期时间  存续年限       结果     剩余多少年\n",
       "代码                                                                    \n",
       "128060  中装转债 2019-03-26 2020-02-12 2025-03-26   0.9  不足3000万  5.120548\n",
       "113507  天马转债 2018-04-17 2019-11-04 2024-04-17   1.6  不足3000万  4.454795\n",
       "113010  江南转债 2016-03-18 2019-01-29 2022-03-18   2.9  不足3000万  3.134247\n",
       "110009  双良转债 2010-05-04 2011-12-14 2015-05-04   1.6  不足3000万  3.389041"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cc_df_[cc_df_['结果']=='不足3000万']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>转债名称</th>\n",
       "      <th>发行时间</th>\n",
       "      <th>退市时间</th>\n",
       "      <th>条款到期时间</th>\n",
       "      <th>存续年限</th>\n",
       "      <th>结果</th>\n",
       "      <th>剩余多少年</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>代码</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>123029</th>\n",
       "      <td>英科转债</td>\n",
       "      <td>2019-08-16</td>\n",
       "      <td>2021-06-28</td>\n",
       "      <td>2025-08-15</td>\n",
       "      <td>1.9</td>\n",
       "      <td>低于3千万</td>\n",
       "      <td>4.134247</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>128012</th>\n",
       "      <td>辉丰转债</td>\n",
       "      <td>2016-04-21</td>\n",
       "      <td>2020-05-25</td>\n",
       "      <td>2022-04-21</td>\n",
       "      <td>4.1</td>\n",
       "      <td>低于3千万</td>\n",
       "      <td>1.906849</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        转债名称       发行时间       退市时间     条款到期时间  存续年限     结果     剩余多少年\n",
       "代码                                                                  \n",
       "123029  英科转债 2019-08-16 2021-06-28 2025-08-15   1.9  低于3千万  4.134247\n",
       "128012  辉丰转债 2016-04-21 2020-05-25 2022-04-21   4.1  低于3千万  1.906849"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cc_df_[cc_df_['结果']=='低于3千万']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "205"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(cb_df)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.024390243902439025"
      ]
     },
     "execution_count": 47,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "5/205"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "cc_df_=cb_df.rename(columns={'code':'代码','name':'转债名称','price':'最后价格','zgcode':'正股代码',\n",
    "'zg':'正股名','issuescale':'发行规模','recallscale':'回售规模','remain':'剩余规模',\n",
    "'issu':'发行时间','stop':'退市时间','end':'条款到期时间','stayyear':'存续年限','result':'结果','more_year':'剩余多少年'\n",
    "})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "cc_df_=cc_df_[['代码',\t'转债名称',\t\t'发行时间',\t'退市时间',\t'条款到期时间',\t'存续年限',\t'结果'\t,'剩余多少年']]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>转债名称</th>\n",
       "      <th>发行时间</th>\n",
       "      <th>退市时间</th>\n",
       "      <th>条款到期时间</th>\n",
       "      <th>存续年限</th>\n",
       "      <th>结果</th>\n",
       "      <th>剩余多少年</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>代码</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>110033</th>\n",
       "      <td>国贸转债</td>\n",
       "      <td>2016-01-05</td>\n",
       "      <td>2021-11-04</td>\n",
       "      <td>2022-01-05</td>\n",
       "      <td>5.8</td>\n",
       "      <td>强赎</td>\n",
       "      <td>0.169863</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>110031</th>\n",
       "      <td>航信转债</td>\n",
       "      <td>2015-06-12</td>\n",
       "      <td>2021-05-28</td>\n",
       "      <td>2021-06-12</td>\n",
       "      <td>6.0</td>\n",
       "      <td>到期</td>\n",
       "      <td>0.041096</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>128010</th>\n",
       "      <td>蔚蓝转债</td>\n",
       "      <td>2016-01-22</td>\n",
       "      <td>2021-02-26</td>\n",
       "      <td>2022-01-22</td>\n",
       "      <td>5.1</td>\n",
       "      <td>强赎</td>\n",
       "      <td>0.904110</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>113008</th>\n",
       "      <td>电气转债</td>\n",
       "      <td>2015-02-02</td>\n",
       "      <td>2021-01-18</td>\n",
       "      <td>2021-02-02</td>\n",
       "      <td>6.0</td>\n",
       "      <td>到期</td>\n",
       "      <td>0.041096</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>110030</th>\n",
       "      <td>格力转债</td>\n",
       "      <td>2014-12-25</td>\n",
       "      <td>2019-12-10</td>\n",
       "      <td>2019-12-25</td>\n",
       "      <td>5.0</td>\n",
       "      <td>到期</td>\n",
       "      <td>0.041096</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>126729</th>\n",
       "      <td>燕京转债</td>\n",
       "      <td>2010-10-15</td>\n",
       "      <td>2015-05-28</td>\n",
       "      <td>2015-10-14</td>\n",
       "      <td>4.6</td>\n",
       "      <td>强赎</td>\n",
       "      <td>0.380822</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>110012</th>\n",
       "      <td>海运转债</td>\n",
       "      <td>2011-01-07</td>\n",
       "      <td>2015-05-11</td>\n",
       "      <td>2016-01-07</td>\n",
       "      <td>4.3</td>\n",
       "      <td>强赎</td>\n",
       "      <td>0.660274</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>110007</th>\n",
       "      <td>博汇转债</td>\n",
       "      <td>2009-09-23</td>\n",
       "      <td>2014-09-05</td>\n",
       "      <td>2014-09-23</td>\n",
       "      <td>5.0</td>\n",
       "      <td>到期</td>\n",
       "      <td>0.049315</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>110003</th>\n",
       "      <td>新钢转债</td>\n",
       "      <td>2008-08-21</td>\n",
       "      <td>2013-08-06</td>\n",
       "      <td>2013-08-20</td>\n",
       "      <td>5.0</td>\n",
       "      <td>到期</td>\n",
       "      <td>0.038356</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        转债名称       发行时间       退市时间     条款到期时间  存续年限  结果     剩余多少年\n",
       "代码                                                               \n",
       "110033  国贸转债 2016-01-05 2021-11-04 2022-01-05   5.8  强赎  0.169863\n",
       "110031  航信转债 2015-06-12 2021-05-28 2021-06-12   6.0  到期  0.041096\n",
       "128010  蔚蓝转债 2016-01-22 2021-02-26 2022-01-22   5.1  强赎  0.904110\n",
       "113008  电气转债 2015-02-02 2021-01-18 2021-02-02   6.0  到期  0.041096\n",
       "110030  格力转债 2014-12-25 2019-12-10 2019-12-25   5.0  到期  0.041096\n",
       "126729  燕京转债 2010-10-15 2015-05-28 2015-10-14   4.6  强赎  0.380822\n",
       "110012  海运转债 2011-01-07 2015-05-11 2016-01-07   4.3  强赎  0.660274\n",
       "110007  博汇转债 2009-09-23 2014-09-05 2014-09-23   5.0  到期  0.049315\n",
       "110003  新钢转债 2008-08-21 2013-08-06 2013-08-20   5.0  到期  0.038356"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cc_df_[cc_df_['剩余多少年']<=1.0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "cc_df_=cc_df_.set_index('代码',drop=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.5555555555555556"
      ]
     },
     "execution_count": 52,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "5/9"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>转债名称</th>\n",
       "      <th>发行时间</th>\n",
       "      <th>退市时间</th>\n",
       "      <th>条款到期时间</th>\n",
       "      <th>存续年限</th>\n",
       "      <th>结果</th>\n",
       "      <th>剩余多少年</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>代码</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>110031</th>\n",
       "      <td>航信转债</td>\n",
       "      <td>2015-06-12</td>\n",
       "      <td>2021-05-28</td>\n",
       "      <td>2021-06-12</td>\n",
       "      <td>6.0</td>\n",
       "      <td>到期</td>\n",
       "      <td>0.041096</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>113008</th>\n",
       "      <td>电气转债</td>\n",
       "      <td>2015-02-02</td>\n",
       "      <td>2021-01-18</td>\n",
       "      <td>2021-02-02</td>\n",
       "      <td>6.0</td>\n",
       "      <td>到期</td>\n",
       "      <td>0.041096</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>110030</th>\n",
       "      <td>格力转债</td>\n",
       "      <td>2014-12-25</td>\n",
       "      <td>2019-12-10</td>\n",
       "      <td>2019-12-25</td>\n",
       "      <td>5.0</td>\n",
       "      <td>到期</td>\n",
       "      <td>0.041096</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>110007</th>\n",
       "      <td>博汇转债</td>\n",
       "      <td>2009-09-23</td>\n",
       "      <td>2014-09-05</td>\n",
       "      <td>2014-09-23</td>\n",
       "      <td>5.0</td>\n",
       "      <td>到期</td>\n",
       "      <td>0.049315</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>110003</th>\n",
       "      <td>新钢转债</td>\n",
       "      <td>2008-08-21</td>\n",
       "      <td>2013-08-06</td>\n",
       "      <td>2013-08-20</td>\n",
       "      <td>5.0</td>\n",
       "      <td>到期</td>\n",
       "      <td>0.038356</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        转债名称       发行时间       退市时间     条款到期时间  存续年限  结果     剩余多少年\n",
       "代码                                                               \n",
       "110031  航信转债 2015-06-12 2021-05-28 2021-06-12   6.0  到期  0.041096\n",
       "113008  电气转债 2015-02-02 2021-01-18 2021-02-02   6.0  到期  0.041096\n",
       "110030  格力转债 2014-12-25 2019-12-10 2019-12-25   5.0  到期  0.041096\n",
       "110007  博汇转债 2009-09-23 2014-09-05 2014-09-23   5.0  到期  0.049315\n",
       "110003  新钢转债 2008-08-21 2013-08-06 2013-08-20   5.0  到期  0.038356"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cc_df_[(cc_df_['剩余多少年']<=1.0)&(cc_df_['结果']=='到期')]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "interpreter": {
   "hash": "28d2dd8735d5b963e054e321a2b13f416b1a0f524027151d22c8eb8270a4fd3f"
  },
  "kernelspec": {
   "display_name": "Python 3.9.5 64-bit ('3.9': conda)",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.5"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
